<template>
  <div>
    <el-button type="primary" @click="handleClickHome">Home</el-button>
    <el-button type="primary" @click="handleClickRefresh">Refresh</el-button>
    <el-button type="primary" @click="handleClickUp">Up</el-button>
  </div>
</template>
    
<script>
export default {
  name: "files-tool-bar",

  data() {
    return {};
  },

  methods: {
    fetch(location) {
      let action = "navigate";
      this.$emit("action", { action, location });
    },

    handleClickRefresh() {
      this.fetch(".");
    },

    handleClickHome() {
      this.fetch("~");
    },

    handleClickUp() {
      this.fetch("..");
    },
  },

  mounted() {
    // this.fetch();
  },

  unmounted() {},

  props: {
    // fmid: String, // files-module-id
  },
};
</script>
